/**
 * <copyright>
 *
 * Copyright (c) 2011 Zeligsoft (2009) Limited
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: 
 *   Zeligsoft (2009) Limited - Initial API and implementation
 *
 * </copyright>
 *
 */
package org.omg.deployment.providers;

import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
import org.omg.deployment.parts.DeploymentViewsRepository;
import org.omg.deployment.parts.forms.ArtifactDeploymentDescriptionPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.ConfigPropertiesPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.ConnectionEndsPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.DeployedResourcePropertiesEditionPartForm;
import org.omg.deployment.parts.forms.DeploymentPlanPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.InstanceDeploymentDescriptionPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.MonolithicDeploymentDescriptionPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.PlanConnectionDescriptionPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.PlanLocalityPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.PlanSubcomponentPortEndpointPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.RequirementsPropertiesEditionPartForm;
import org.omg.deployment.parts.forms.XMIPropertiesEditionPartForm;
import org.omg.deployment.parts.impl.ArtifactDeploymentDescriptionPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.ConfigPropertiesPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.ConnectionEndsPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.DeployedResourcePropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.DeploymentPlanPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.InstanceDeploymentDescriptionPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.MonolithicDeploymentDescriptionPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.PlanConnectionDescriptionPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.PlanLocalityPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.PlanSubcomponentPortEndpointPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.RequirementsPropertiesEditionPartImpl;
import org.omg.deployment.parts.impl.XMIPropertiesEditionPartImpl;




/**
 * @author Toby McClean; Zeligsoft (2009) Limited
 * @generated
 */
public class DeploymentPropertiesEditionPartProvider implements IPropertiesEditionPartProvider {

	/** 
	 * {@inheritDoc}
	 * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#provides(java.lang.Object)
	 * @generated
	 */
	public boolean provides(Object key) {
    return key == DeploymentViewsRepository.class;
  }

	/** 
	 * {@inheritDoc}
	 * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#getPropertiesEditionPart(java.lang.Object, int, org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent)
	 * @generated
	 */
	public IPropertiesEditionPart getPropertiesEditionPart(Object key, int kind, IPropertiesEditionComponent component) {
    if (key == DeploymentViewsRepository.ArtifactDeploymentDescription.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new ArtifactDeploymentDescriptionPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new ArtifactDeploymentDescriptionPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.DeploymentPlan.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new DeploymentPlanPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new DeploymentPlanPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.InstanceDeploymentDescription.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new InstanceDeploymentDescriptionPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new InstanceDeploymentDescriptionPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.MonolithicDeploymentDescription.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new MonolithicDeploymentDescriptionPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new MonolithicDeploymentDescriptionPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.PlanConnectionDescription.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new PlanConnectionDescriptionPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new PlanConnectionDescriptionPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.PlanLocality.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new PlanLocalityPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new PlanLocalityPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.PlanSubcomponentPortEndpoint.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new PlanSubcomponentPortEndpointPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new PlanSubcomponentPortEndpointPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.XMI.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new XMIPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new XMIPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.ConnectionEnds.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new ConnectionEndsPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new ConnectionEndsPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.Requirements.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new RequirementsPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new RequirementsPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.ConfigProperties.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new ConfigPropertiesPropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new ConfigPropertiesPropertiesEditionPartForm(component);
    }
    if (key == DeploymentViewsRepository.DeployedResource.class) {
      if (kind == DeploymentViewsRepository.SWT_KIND)
        return new DeployedResourcePropertiesEditionPartImpl(component);
      if (kind == DeploymentViewsRepository.FORM_KIND)
        return new DeployedResourcePropertiesEditionPartForm(component);
    }
    return null;
  }

}
